parameters:
  osGroup: ''
  sendParams: ''
  condition: ''
  displayName: ''
  environment: {}
  shouldContinueOnError: false

steps:
- ${{ if eq(parameters.osGroup, 'windows') }}:
  - powershell: $(Build.SourcesDirectory)\eng\common\msbuild.ps1 --restore -ci -warnaserror 0 ${{ parameters.sendParams }}
    displayName: ${{ parameters.displayName }} (Windows)
    condition: and(succeeded(), ${{ and(ne(parameters.condition, false), ne(parameters.sendParams, '')) }})
    env: ${{ parameters.environment }}
    continueOnError: ${{ eq(parameters.shouldContinueOnError, true) }}

- ${{ if ne(parameters.osGroup, 'windows') }}:
  - script: $(Build.SourcesDirectory)/eng/common/msbuild.sh --restore --ci --warnaserror false ${{ parameters.sendParams }}
    displayName: ${{ parameters.displayName }} (Unix)
    condition: and(succeeded(), ${{ and(ne(parameters.condition, false), ne(parameters.sendParams, '')) }})
    env: ${{ parameters.environment }}
    continueOnError: ${{ eq(parameters.shouldContinueOnError, true) }}
